"""
   author: 陈亚敏
   data: 2021/11/12  15:17
   project: 1
"""
def type(passwd):
    s3=set()
    global score
    for i in passwd:
        if i.isdigit():
                s3.add(1)
        elif i.isupper():
                s3.add(2)
        elif i.islower():
                s3.add(3)
        elif (i in string):
                s3.add(4)
    if len(s3)>=3:
        score+=1
        return print("密码由3种以上字符组成！+1分")
    else:
        return print("密码没有由3种以上字符组成！")
def repeat(passwd):
    s2 = ''
    global score
    for j in passwd:
        s2 += j
        if len(s2) >= 3:
            if passwd.count(s2) > 1:
                return print(score,'密码有重复')
            else:
                score += 1
                return print("密码没有重复！很棒 +1分！！")
def logging(passwd):
    global score
    if len(passwd)>8:
        score+=1
        type(passwd)
        repeat(passwd)
        return print(f"你的密码最终得分为：{score}分")


    else:
        return "密码长度不足八位！"

score = 2
string = "~!@#$%^&*()_+-*/<>,.[]\/"
a=input("请输入你的密码：")
logging(a)